<template>
	<view class="u-wrap u-p-l-20 u-p-r-20">
		<u-form :model="addModel" ref="uForm">
			<u-form-item label="类型:">
				<u-radio-group v-model="addModel.type">
					<u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
						{{ item.name }}
					</u-radio>
				</u-radio-group>
			</u-form-item>
			<u-form-item label="名称:">
				<u-input placeholder="请输入名称" v-model="addModel.name" />
			</u-form-item>
			<u-form-item label="简介:">
				<u-input placeholder="请输入简介" v-model="addModel.name" />
			</u-form-item>
			<u-form-item label="价格:">
				<u-input placeholder="请输入价格" v-model="addModel.price" />
			</u-form-item>
			<u-form-item label-width="auto" label="联系人:">
				<u-input placeholder="请输入联系人"  v-model="addModel.username" />
			</u-form-item>
			<u-form-item label-width="auto" label="联系电话:">
				<u-input placeholder="请输入联系电话"  v-model="addModel.phone" />
			</u-form-item>
			<u-form-item label="图片:"></u-form-item>
			<u-upload :action="action" :file-list="fileList" ></u-upload>
		</u-form>
		<u-button :custom-style="customStyle">发布</u-button>
	</view>
</template>

<script setup>
	import {
		reactive,
		ref
	} from 'vue';

	const addModel = reactive({
		type: '',
		title: '',
		introduce: '',
		price: '',
		userName: '',
		phone: '',
		image: ''
	})
	const list = [{
		name: '闲置',
		disabled: false,
	}, {
		name: '求购',
		disabled: false

	}]
	const value = ref('')
	const action = ref('')
	const fileList = ref([])
	const customStyle = reactive({
		background:'#FF7670',
		width:'100%',
		color:'#FFF',
		marginTop:'50px',
	})
</script>

<style>

</style>